package com.ldzy.dao;

import com.ldzy.pojo.Orders;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersDao {
//    public Orders findById (int id);
    @Select("select * from  orders where id=#{id}")
    @Results({
            @Result(property = "productList",column = "id",many  =@Many(select =  "com.ldzy.dao.ProductDao.findProductByOrdersIds"))
    })
    public List<Orders> findOrderByUsersId(int user_id);
}
